﻿using System;
using System.Collections.Generic;
using System.Text;
using ContentRenderingApi.Extender;
using ContentRenderingApi.Path;

namespace ContentRenderingApi.Skeleton
{
    /// <summary/>
    internal class WildcardOverrideSkeleton 
    {
        private AbstractPath _path;
        private Action<NodeExtender, string, List<object>> _wildcardOverrideCallback;

        /// <summary/>
        internal WildcardOverrideSkeleton(
            AbstractPath path,
            Action<NodeExtender, string, List<object>> wildcardOverrideCallback)
        {
            this._path = path;
            this._wildcardOverrideCallback = wildcardOverrideCallback;
        }

        /// <summary/>
        public AbstractPath Path
        {
            get { return this._path; }
        }

        /// <summary/>
        public void Invoke(NodeExtender nodeExtender, string name, List<object> values)
        {
            this._wildcardOverrideCallback(nodeExtender, name, values);
        }
    }
}
